EFFECT.ImpactEffect = Material("models/roller/rollermine_glow")

function EFFECT:Init(data)
	self.EndSize = data:GetMagnitude()
	self.shield = data:GetEntity()
	self.LifeTime = data:GetScale()
	self.StartTime = CurTime()
	self.EndTime = CurTime() + data:GetScale()
	self.Position = data:GetOrigin()
	self.Normal = data:GetNormal()
	self.color = self.shield:GetNetworkedVector( "impactcolor" )
	self.Alpha = 1
	self.Size = 0
end 

function EFFECT:Think()
	if (self.Alpha <= 0) then
		return false
	else
		self.Alpha = 1 - ((CurTime() - self.StartTime) / self.LifeTime)
		self.Size = self.EndSize * (1 - self.Alpha)
		return true
	end
end 

function EFFECT:Render()
	Msg("Rendering\n")
	self.ImpactEffect:SetMaterialVector("$color", self.color )
	self.ImpactEffect:SetMaterialFloat("$alpha", self.Alpha )
	render.SetMaterial(self.ImpactEffect)
	render.DrawQuadEasy(self.Entity:GetPos(),self.Normal,self.Size,self.Size)
	render.DrawQuadEasy(self.Entity:GetPos(),self.Normal*-1,self.Size,self.Size)
end